<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

/**
 * App\Broker
 *
 * @property int $id
 * @property string|null $name 名称
 * @property string|null $atvar 头像
 * @property int|null $true_mobile 真实手机
 * @property int|null $bind_mobile 绑定手机
 * @property string|null $wechat 微信号
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property int|null $level_id 经纪人等级
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Broker whereAtvar($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Broker whereBindMobile($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Broker whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Broker whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Broker whereLevelId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Broker whereName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Broker whereTrueMobile($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Broker whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Broker whereWechat($value)
 * @mixin \Eloquent
 * @property string|null $seqId 唯一号
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Broker whereSeqId($value)
 * @property int|null $broker_mobile_id
 * @property string|null $compony
 * @property string|null $is_agent
 * @property string|null $remember_token
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Broker whereBrokerMobileId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Broker whereCompony($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Broker whereIsAgent($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Broker whereRememberToken($value)
 */
class Broker extends Model
{
    protected  $table='brokers';

    public static function getSelectOptions()
    {
        $options = \DB::table('brokers')->select('id','name as text')->get();
        $selectOption = [];
        foreach ($options as $option){
            $selectOption[$option->id] = $option->text;
        }
        return $selectOption;
    }


}
